Yolov4的onnx模型C++推导 |
您所在的位置:网站首页 › yolo ocr › Yolov4的onnx模型C++推导 |
Yolov4的onnx模型C++推导
原创
光哥201011 2023-04-06 20:32:49 博主文章分类:目标检测 ©著作权 文章标签 yolov4 目标检测 C++ onnx 文章分类 深度学习 人工智能 yyds干货盘点 ©著作权归作者所有:来自51CTO博客作者光哥201011的原创作品,请联系作者获取转载授权,否则将追究法律责任1、环境:win10+cuda11.4+onnxruntime-gpu1.10+opencv3.4.4+vs2019 c++ GPU:本人使用的NVIDIA GeForce GTX 1650 4GB显存。
2、yolov4模型的训练参考: https://edu.51cto.com/course/22877.html https://github.com/AlexeyAB/darknet darknet模型转onnx模型参考: https://github.com/Tianxiaomo/pytorch-YOLOv4
3、C++调用测试:
#include"deeplearning_yolo_interface.h" #include #include #include #include #include #include "encoding.h" static std::string wstringToUtf8(const std::wstring& str) { std::wstring_convert strCnv; return strCnv.to_bytes(str); } int main(int argc,char** argv) { std::string modelpath = argv[1]; std::string image_file = argv[2]; std::string gpu_id = argv[3]; std::string yolo_type = argv[4]; int yoloType = atoi(yolo_type.c_str()); int gpuId= atoi(gpu_id.c_str()); //初始化OCR模型 void* modelHandles = DL_YOLO_LIB_CPP::DL_YOLO_Init(modelpath, gpuId, yoloType); if (modelHandles == NULL) { cout |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |